<template>
	<view class="content">
		<view class="title">我的追剧</view>
		<view class="list_content">
			<view class="list_item" v-for="(item, index) in dataList" :key="index" @tap.stop="clickToItem(item, index)">
				<view class="list_item_cover">
					<image class="image" :src="item.thumbnail||item.cover" mode="aspectFill"></image>
				</view>
				<view class="list_item_info">
					<view class="list_item_info_name">{{ item.playlet_name }}</view>
					<view class="list_item_info_center">
						<view class="list_item_info_center_lastTime">
							{{ item.playlet_number_name != null ? '上次看到' + item.playlet_number_name : '第一集' }}
						</view>
							<view class="list_item_info_center_updateReminder" >继续追剧</view>
					<!-- 	<view class="list_item_info_center_updateReminder" @tap.stop="clickToUpdateReminder">更新提醒</view> -->
					</view>
					<view class="list_item_info_totalSet">共{{ item.last_episode_number }}集</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import tools from '@/utils/tools.js'
	export default {
		data() {
			return {
			}
		},
		props: {
			dataList: {
				type: Array,
				default: function() {
					return []
				}
			}
		},
		methods:{
			clickToUpdateReminder() {
				tools.setup_subscribeMessage()
			},
			clickToItem(res, index) {
				this.$emit("clickToItem", res, index)
			}
		}
	}
</script>

<style lang="scss">
	.content{
		display: flex;
		box-sizing: border-box;
		flex-direction: column;
		background-color: #FFFFFF;
		width: 100%;
		margin-top: 30rpx;
		border-radius: 5px;
		
		.title{
			margin: 20rpx;
			font-size: 18px;
			font-weight: 700;
			color: #3D3D3D;
		}
		
		.list_content{
			display: flex;
			box-sizing: border-box;
			flex-direction: column;
			padding: 0rpx 30rpx;
			
			.list_item{
				display: flex;
				box-sizing: border-box;
				flex-direction: row;
				width: 100%;
				height: 208rpx;
				margin-bottom: 30rpx;
				// background-color: red;
				
				.list_item_cover{
					display: flex;
					flex-shrink: 0;
					width: 160rpx;
					height: 208rpx;
					border-radius: 10rpx;
					.image{
						width: 100%;
						height: 100%;
						border-radius: 10rpx;
					}
				}
			
				.list_item_info{
					display: flex;
					box-sizing: border-box;
					flex-direction: column;
					width: 100%;
					margin-left: 30rpx;
					// background-color: yellowgreen;
					
					.list_item_info_name{
						width: 100%;
						margin-top: 15rpx;
						font-size: 16px;
						font-weight: 500;
						color: #3D3D3D;
						white-space: nowrap;
						overflow: hidden;
						text-overflow: ellipsis;
						// background-color: red;			
					}
					
					.list_item_info_center{
						display: flex;
						box-sizing: border-box;
						flex-direction: row;
						width: 100%;
						margin-top: 20rpx;
						justify-content: space-between;
						align-items: center;
						// background-color: purple;
						
						.list_item_info_center_lastTime{
							width: 64%;
							font-size: 14px;
							font-weight: 400;
							color: #666262;
							display: -webkit-box;
							-webkit-line-clamp: 2;
							-webkit-box-orient: vertical;
							overflow: hidden;
							text-overflow: ellipsis;
						}
						.list_item_info_center_updateReminder{
							font-size: 15px;		
							width: 150rpx;
							height: 70rpx;
							line-height: 70rpx;
							border-radius: 44rpx;
							color: #ffffff;
							background-color: #F69F54;
							text-align: center;
						}
					}

					.list_item_info_totalSet{
						margin-top: 18rpx;
						font-size: 14px;
						color: #DF7C28;
						// background-color: blue;
					}
				}
				
			}
		}
	}
</style>